package org.jxf.gps.jfinal.model;

import java.util.List;

import org.jxf.gpsdata.model.FenceType;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;

public class Fence extends Model<Fence>{
	
	private String type;
	
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	public static List<Record> loadCircleFenceByGroup(String groupId){
		return Db.find("select * from fence "
				+ "where fenceType=? and "
				+ "groupid in (select getChildidList(?))",FenceType.FENCETYPE_CIRCLE,groupId);
	}

}
